<?php include_once($_SERVER['DOCUMENT_ROOT']."/controller/common/common_setting_unit.php");         // 引入通用的设置文件 ?>
<?php include_once($_SERVER['DOCUMENT_ROOT']."/controller/common/module/head.php"); // 引入通用的头部 ?>
<?php include_once("../controller/data_edit.php");                     // 当前页面的控制器 ?>
<body>
<!--顶部栏-->
<div id="topbar"> <?php include $_SERVER['DOCUMENT_ROOT'].'/controller/common/module/topbar.php'; ?></div>
<!--容器-->
<div id="container" class="<? echo $now_extender ?>">
    <!--侧边栏-->
    <div id="sidebar"><?php include $_SERVER['DOCUMENT_ROOT'].'/controller/common/module/sidebar.php'; ?></div>
    <!--主内容-->
    <div id="content">
        <!--标题设定-->
        <?php $page_title='添加';?>
        <?php include $_SERVER['DOCUMENT_ROOT'].'/controller/common/module/mod-page-title.php'; ?>
        <?//============================================?>
        <?//以下开发需要注重的部分，主要写前端?>
        <?//============================================?>





        <div class="detail-box">
            <ul class="detail-boxing">
                <form id="data_form" method="post" class="layui-form"
                      action ="data_edit_process.php?<? echo $data['url_parameter'] ?>"
                      enctype="multipart/form-data">

                    <input type="hidden"  name="nid" value="<? echo $data['data_detail']['nid']?>" >


                    <!--普通的input文本输入-->
                    <li class="layui-form-item name">
                        <label class="layui-form-label">规则标题：</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input"  name="ai_title"  value="<? echo $data['data_detail']['title'] ?>">
                            <em class="explain">(<u style="color:red">*必填项目</u>, 填写标题) </em>
                        </div>
                    </li>

                    <!--单选项-->
                    <li class="layui-form-item language">
                        <label class="layui-form-label">生成语言：</label>
                        <div class="layui-input-block">
                            <input name='ai_language' type='radio' value='中文' title="中文">
                            <input name='ai_language' type='radio' value='英文' title="英文">
                            <em class="explain">(选择立即发布，以上信息才能在前台显示；选择暂未发布，只对以上信息进行保存，不在前台显示)</em>
                        </div>
                    </li>


                    <li class="layui-form-item name">
                        <label class="layui-form-label">字数限制：</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input"  name="ai_limitation"  value="">
                            <em class="explain">不限制则留空</em>
                        </div>
                    </li>



                    <!--普通的input文本输入-->
                    <li class="layui-form-item name">
                        <label class="layui-form-label">公司名称：</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input"  name="ai_company"  value="<? echo $data['data_detail']['title'] ?>">
                            <em class="explain">(<u style="color:red">*必填项目</u>, 填写标题) </em>
                        </div>
                    </li>


                    <!--普通的input文本输入-->
                    <li class="layui-form-item name">
                        <label class="layui-form-label">产品名称：</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input"  name="ai_product"  value="<? echo $data['data_detail']['title'] ?>">
                        </div>
                    </li>






                    <div class="layui-form-item">
                        <label class="layui-form-label">自家行业</label>
                        <div class="layui-input-block" >
                            <? foreach ($industry_type_array as $k => $v){?>
                                <input type="checkbox" name="ai_from_industry_type[]"  value="<?echo $v?>"     title="<?echo $v?>"
                                    <? if(in_array($v,$now_member_rank_array))   {echo "checked";} ?>>
                                <?;}?>
                        </div>
                    </div>


                    <div class="layui-form-item">
                        <label class="layui-form-label">目标行业</label>
                        <div class="layui-input-block" >
                            <? foreach ($industry_type_array as $k => $v){?>
                                <input type="checkbox" name="ai_from_industry_type[]"  value="<?echo $v?>"     title="<?echo $v?>"
                                    <? if(in_array($v,$now_member_rank_array))   {echo "checked";} ?>>
                                <?;}?>
                        </div>
                    </div>



                    <!--普通的textarea多行文本输入-->
                    <li class="layui-form-item introduce">
                        <label class="layui-form-label">要求：</label>
                        <div class="layui-input-block">
                            <textarea class="layui-textarea" name="ai_require"  ><?echo  $data['data_detail']['require']?></textarea>
                            <em class="explain">(填写本文的概述)</em>
                        </div>
                    </li>





                    <div class="function">
                        <button class="layui-btn"  lay-submit type="submit" >立即提交</button>
                        <input type="reset" class="layui-btn" value="重置"/>
                        <a href="javascript:;" class="layui-btn layui-bg-red layui-icon layui-icon-top go_top"></a>
                    </div>



                </form>
            </ul>
        </div>





        <?//============================================?>
        <?//以下JS部分需要根据实际情况去加载?>
        <?//============================================?>
    </div>
    <!--content end-->
    <br class="clearfloat"/>
    <!--container-->
</div>

<?
    //==============================================================================
    //JS加载区域
    //==============================================================================
?>

<script>
</script>

<!--底部栏-->
<?php include $_SERVER['DOCUMENT_ROOT']."/controller/common/module/footer.php"; ?>


